﻿using System.Collections.Generic;
using EnetaMvc.ApplicationServices.Dto;
using EnetaMvc.Core.Domain.Common;
using EnetaMvc.Infrastructure;

namespace EnetaMvc.ApplicationServices
{
    public interface IUserService
    {
        FullProfileDto GetFullProfileById(long id);
        UserDto GetUserById(long id);
        UserDto GetUserByToken(string token);
        UserDto GetUserByUserName(string userName);
        bool IsUserNameFree(string username);
        PagedResult<User> ListUsers(int page, int pageSize);
        MultiValidationResult RegisterUser(string username, string email, string token);
        void SaveUser(FullProfileDto profile);
        void SaveProfileImage(long userId, byte[] imageBytes);
        bool UserTokenExists(string token);
        IList<MyRoleDto> ListMyRoles();
        IList<UserDto> ListLatelyJoinedUsers(int count);
        void LockUser(long userId);
        void UnlockUser(long userId);
        string[] GetUserRoles(long userId);
        string[] ListRoles();
        IList<UserDto> FindUsers(string searchString);
    }
}
